from django import template

# 建立模版对象
register = template.Library()

@register.filter(name='sub1')
def sub(value):  # 参数最多2哥
    return value - 1
